package com.zb.controller;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zb.Service.CardorderService;

import com.zb.Service.TaskService;

@Scope("prototype")
@Component
@RequestMapping("/card")
public class CardorderControllee {

	@Resource
	private CardorderService cs;

	@Resource
	private TaskService ts;

	@RequestMapping(params = "op=save")
	public String toshow(int userid, int deptid, String ordertime,
			String phone, String tel, int count, String content, int roleid,ModelMap modelmap) {
		cs.savecard(userid, deptid, ordertime, phone, tel, count, content, roleid);
		int contentid = cs.getMaxId();
		ts.saveTask(userid, 6, contentid, roleid);
		modelmap.put("msg", "操作成功");
		return "card";
	}

}
